#include <iostream>
using namespace std;

const int kMaxA = 30;
int fibonacci[kMaxA + 1];

int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int T;
  fibonacci[1] = fibonacci[2] = 1;
  for (int i = 3; i <= kMaxA; i++) {
    fibonacci[i] = fibonacci[i - 1] + fibonacci[i - 2];
  }
  for (cin >> T; T; T--) {
    int a;

    cin >> a;
    cout << fibonacci[a] << "\n";
  }
  return 0;
}